<%@ page language="java" contentType="text/html; charset=utf-8"	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<base href="<%=basePath %>">
		<meta charset="UTF-8">
		<title>添加物料类型</title>
		<link rel="stylesheet" type="text/css" href="<%=basePath %>css/style.css"/>
		<link rel="stylesheet" type="text/css" href="<%=basePath %>css/form.css"/>
	</head>
	<body>
		<!-- 蓝色背景区域 -->
		<div class="wrap">
			<!-- 白色可用区域 -->
			<div class="canuse">
				<!------ 位置 ------>
	            <p class="contentText local"><span>位置：设备管理 > 添加设备信息</span></p>
	            
			    	<div class="article_list" style="width: 98.5%; margin: 0px auto;">
			            <!------- 内容 ------->
			            <div class="content content1">
			                <!-- 用户列表内容区 -->
			                <div class="con con_01">
			                    <!-- 表单信息填写区 -->
			                    <h4 class="sel_title"><img src="<%=basePath %>img/list/brand1.png" /><span>填写设备信息</span><span class="necessary">（带*号为必填项）</span></h4>
			                    <div class="write_area">
			                        <form id="addForm" action="" method="post">
			                            <table class="contentText" border="1" cellspacing="0" cellpadding="0" width="99%">
			                                <tbody>
			                                    <tr>
			                                        <th>设备名称：</th>
			                                        <td>
			                                        	<input id="" name="deviceName" type="text" value="${device.deviceName}"> <span class="redColor">*</span>
			                                        </td>
			                                        <th>仓库：</th>
			                                        <td>
			                                        	<input id="" name="storeName" type="text" value="${device.storeName}"> <span class="redColor">*</span>
			                                        </td>
													<th>类型：</th>
			                                        <td>
			                                        	<select id="" name="type">
			                                        		<option value="1">入库</option>
			                                        		<option value="2">出库</option>
			                                        		<option value="0">绑卡</option>
			                                        	</select>
			                                        	 <span class="redColor">*</span>
			                                        </td>
			                                    </tr>
												<tr>
			                                        <th>IP地址：</th>
			                                        <td>
			                                        	<c:if test="${device.ipAddress != null and device.ipAddress != '' }">
			                                        	<input id="" name="ipAddress" type="text" value="${device.ipAddress }" readOnly> <span class="redColor">*</span>
			                                        	</c:if>
			                                        	<c:if test="${device.ipAddress == null or device.ipAddress == '' }">
			                                        	<input id="" name="ipAddress" type="text" value="${device.ipAddress }"> <span class="redColor">*</span>
			                                        	</c:if>
			                                        </td>
			                                        <th>端口号：</th>
			                                        <td>
			                                        	<input id="" name="port" value="${device.port }"> <span class="redColor">*</span>
			                                        </td>
												</tr>
												<tr>
			                                        <th>备注：</th>
			                                        <td colspan="5">
			                                            <textarea style="width: 95%;height: 100px;"></textarea>
			                                        </td>
			                                    </tr>
			                                </tbody>
			                            </table>
			                        </form>
			                        <!-- 保存、重置按钮区 -->
			                        <div align="center" class="btn_submit">
			                            <a onclick="DeviceAdd.addDevice()" class="bgd_blue_two img_hand contentText">确定</a>
			                            <a onclick="DeviceAdd.backPath()" class="bgd_white_two img_hand"> 返回 </a>
			                        </div>
			                    </div>
			                </div>
			            </div>
			        </div>
				</div>
	            
			</div>
			
			<!-- 版尾  -->
			<div class="ending">
				Copyright© 2019-2020 磐基技术有限公司
			</div>
		</div>
	</body>
	<script src="<%=basePath %>js/3rd/jquery-1.9.1.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="<%=basePath %>js/3rd/jquery.validate.js" type="text/javascript" charset="utf-8"></script>
	<script src="<%=basePath %>js/common/common.js" type="text/javascript" charset="utf-8"></script>
	<script src="<%=basePath %>js/deviceManagement/deviceAdd.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		var h = document.documentElement.clientHeight;
		$(".wrap").css("height", h);
		var basePath = "<%=basePath%>";
		// 获取每行 td 的兄弟节点
		$(".info_area td").hover(   
			function () {      
				$(this).parent().children().addClass("td_hover");   
			},    
			function () {      
				$(this).parent().children().removeClass("td_hover");   
			}
		);
		
	</script>
</html>
